<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分支结构</title>
</head>
<body>
<input type="text" id="scode">
<button onclick="funIf()">提交</button>
</body>
<script>
    function funIf(){
        var scode = Number(document.getElementById("scode").value)
        if (scode>=60){
            document.write("<h2>及格</h2>")
        }else{
            document.write("<h2>不及格</h2>")
        }
    }
</script>
</html>